public class SaveMoney {
    public static void main(String[] args) {
        int amount = 8000;
        ConstrutionBank bank1 = new ConstrutionBank();
        bank1.savedMoney = amount;
        bank1.year = 8.236;
        bank1.setInterestRate(0.035);
        double interest1 = bank1.computerInterest();
        BankOfDalian bank2 = new BankOfDalian();
        bank2.savedMoney = amount;
        bank2.year = 8.236;
        bank2.setInterestRate(0.033);
        double interest2 = bank2.computerInterest();
        System.out.println("8000元存在建设银行8年零236天利汐" + interest1 + "元");
        System.out.println("8000元存在大连银行8年零236天利汐" + interest2 + "元");
        System.out.println("两个银行利息相差" + (interest2 - interest1) +"元");
    }
}
